package com.nanmeishu.springdatajpa.jpademo.service;

import com.nanmeishu.springdatajpa.jpademo.repository.UserRepository;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

@Service
public class UserService {

    @Autowired
    UserRepository userRepository;

    @Transactional
    public void updateUser(int id,String username){
        userRepository.updateUser(id,username);
    }

}
